using System.Collections.Generic;
using Common.Core;

namespace Common.Unity.Extensions.PropertyMapper
{
	public class PropertyMappingContext
	{
		readonly PropertyMappingKey key;
		readonly object source;
		readonly object target;

		public PropertyMappingContext( PropertyMappingKey key, object source, object target )
		{
			Guard.IsNotNull( key, "key" );
			Guard.IsNotNull( source, "source" );
			Guard.IsOfType( key.Source, source.GetType() );
			this.key = key;
			this.source = source;
			this.target = target;
		}

		public PropertyMappingKey Key
		{
			get { return key; }
		}

		public object Source
		{
			get { return source; }
		}

		public object Target
		{
			get { return target; }
		}
	}
}